package cn.iocoder.yudao.module.biz.controller.admin.expand.view.domain;

import cn.iocoder.yudao.framework.excel.core.util.poi.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 大屏拓展记录查询
 * @TableName san_biz_expand_record_view
 */
//@TableName(value ="san_biz_expand_record_view")
@Data
public class SanBizExpandRecordView implements Serializable {

    @Schema(description = "页码，从 1 开始", requiredMode = Schema.RequiredMode.REQUIRED,example = "1")
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为 1")
    @TableField(exist = false)
    private Integer pageNo = 1;

    @Schema(description = "每页条数，最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
    @NotNull(message = "每页条数不能为空")
    @Min(value = 1, message = "每页条数最小值为 1")
    @Max(value = 100, message = "每页条数最大值为 100")
    @TableField(exist = false)
    private Integer pageSize = 10;

    @TableField(exist = false)
    private Integer offset; // = (new BigDecimal(this.pageNo).subtract(new BigDecimal(1))).multiply(new BigDecimal(this.pageSize)).intValue();

    public Integer getOffset() {
        return (new BigDecimal(this.pageNo).subtract(BigDecimal.ONE))
                .multiply(new BigDecimal(this.pageSize)).intValue();
    }
    /**
     * 主键ID
     */
    @Schema(description = "拓展记录id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    /**
     * 拓展目标id
     */
    private Long targetId;

    /**
     * 拓展人id
     */
    private Integer ownerUserId;

    /**
     * 客户名称
     */
    @Excel(name = "客户名称")
    private String customerName;

    /**
     * 客户地址
     */
    @Excel(name = "地址")
    private String address;

    /**
     * 联系人名称
     */
    @Excel(name = "联系人")
    private String contactName;

    /**
     * 联系人电话
     */
    @Excel(name = "联系电话")
    private String contactNumber;

    /**
     * 拓展次数
     */
    @Excel(name = "累计拜访次数")
    private Integer totalCount;

    /**
     * 拓展时间
     */
    @Excel(name = "最后一次拓展时间",align = HorizontalAlignment.LEFT, width = 30, dateFormat = "yyyy-MM-dd")
    private Date expandTime;

    /**
     * 用户昵称
     */
    @Excel(name = "拓展人员")
    private String nickname;

    /**
     * 部门名称
     */
    @Excel(name = "单位/中心")
    private String deptName;

    /**
     * 小组名称
     */
    @Excel(name = "部门")
    private String teamName;

    /**
     * 客户需求
     */
    @Excel(name = "需求描述")
    private String customerRequire;

    /**
     * 切入点
     */
    @Excel(name = "切入点")
    private String breakthroughPoint;


    /**
     * 拓展记录
     */
    @Excel(name = "当前拜访进度")
    private String expandProcess;

    /**
     * 拓展情况
     */
    @Excel(name = "拓展情况")
    private String expandSituation;

    /**
     * 
     */
    @TableField(exist = false)
    private List<String> expandTimeStr;

    /**
     * 有跟访
     */
    private String hasFollow;

    /**
     * 有附件
     */
    private String hasFile;

    /**
     * 是否删除
     */
    @Schema(description = "是否删除")
    private Boolean deleted;

    /**
     * 租户ID
     */
    @Schema(description = "租户ID")
    private Long tenantId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}